package com.ly.mpayment.persist.entity;

import java.math.BigDecimal;
import java.util.Date;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;


/**
 * DownShopProduct entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="downshopproduct"

)

public class DownShopProduct  implements java.io.Serializable {


    // Fields

     private String downprouuid;
     private ProvincialInformation provincialInformation;
     private Operators operators;
     private BusinessType businessType;
     private User user;
     private String productName;
     private String downfacevalue;
     private BigDecimal discount;
     private int status;
     private Date createtime;
     private Date modifytime;
     private Integer fastchargetype;
     private Integer downfailnum;
     private Integer downtimeinterva;
     private String remark;
     private BigDecimal price;
     private BigDecimal discountAmount;
     private int auto;
     private String validity;
     private String productCode;
     private String cityName;
//     private List<MatchingStrategy> matchs;
//     private Set<DownProLog> downProLogs = new HashSet<DownProLog>(0);
//     private Set<DownRechargeGame> downRechargeGames = new HashSet<DownRechargeGame>(0);
//     private Set<DownRechargeFlow> downRechargeFlows = new HashSet<DownRechargeFlow>(0);


    // Constructors

    /** default constructor */
    public DownShopProduct() {
    }


    public DownShopProduct(String downprouuid) {
		this.downprouuid = downprouuid;
	}


	/** full constructor */
    public DownShopProduct(ProvincialInformation provincialInformation, Operators operators, BusinessType businessType,
    		User user, String downproname, String downfacevalue, BigDecimal discount, int status, Date createtime, Date modifytime,
    		int fastchargetype, Integer downfailnum, Integer downtimeinterva, String remark, Set<DownProductLog> downProLogs,
    		Set<DownRechargeGame> downRechargeGames, Set<DownRechargeFlow> downRechargeFlows,String productName) {
        this.provincialInformation = provincialInformation;
        this.operators = operators;
        this.businessType = businessType;
        this.user = user;
        this.downfacevalue = downfacevalue;
        this.discount = discount;
        this.status = status;
        this.createtime = createtime;
        this.modifytime = modifytime;
        this.fastchargetype = fastchargetype;
        this.downfailnum = downfailnum;
        this.downtimeinterva = downtimeinterva;
        this.remark = remark;
        this.productName = productName;
//        this.downProLogs = downProLogs;
//        this.downRechargeGames = downRechargeGames;
//        this.downRechargeFlows = downRechargeFlows;
    }

    public DownShopProduct(String downprouuid, ProvincialInformation provincialInformation, Operators operators, BusinessType businessType, User user, String productName, String downfacevalue, BigDecimal discount, int status, Date createtime, Date modifytime, Integer fastchargetype, Integer downfailnum, Integer downtimeinterva, String remark, BigDecimal price, BigDecimal discountAmount, int auto, String validity, String productCode, String cityName) {
        this.downprouuid = downprouuid;
        this.provincialInformation = provincialInformation;
        this.operators = operators;
        this.businessType = businessType;
        this.user = user;
        this.productName = productName;
        this.downfacevalue = downfacevalue;
        this.discount = discount;
        this.status = status;
        this.createtime = createtime;
        this.modifytime = modifytime;
        this.fastchargetype = fastchargetype;
        this.downfailnum = downfailnum;
        this.downtimeinterva = downtimeinterva;
        this.remark = remark;
        this.price = price;
        this.discountAmount = discountAmount;
        this.auto = auto;
        this.validity = validity;
        this.productCode = productCode;
        this.cityName = cityName;
    }

    // Property accessors
    @Id
    public String getDownprouuid() {
        return this.downprouuid;
    }

    public void setDownprouuid(String downprouuid) {
        this.downprouuid = downprouuid;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="provinceuuid")

    public ProvincialInformation getProvincialInformation() {
        return this.provincialInformation;
    }

    public void setProvincialInformation(ProvincialInformation provincialInformation) {
        this.provincialInformation = provincialInformation;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="operatoruid")

    public Operators getOperators() {
        return this.operators;
    }

    public void setOperators(Operators operators) {
        this.operators = operators;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="busuuid")

    public BusinessType getBusinessType() {
        return this.businessType;
    }

    public void setBusinessType(BusinessType businessType) {
        this.businessType = businessType;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="useruuid")

    public User getUser() {
        return this.user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @Column(name = "city_name", length = 20)
    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    @Column(name="product_code")
    public String getProductCode() {
		return productCode;
	}
	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}

    @Column(name="product_name")
    public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

    @Column(name="downfacevalue")

    public String getDownfacevalue() {
        return this.downfacevalue;
    }



	public void setDownfacevalue(String downfacevalue) {
        this.downfacevalue = downfacevalue;
    }

    @Column(name="discount")

    public BigDecimal getDiscount() {
        return this.discount;
    }

    public void setDiscount(BigDecimal discount) {
        this.discount = discount;
    }

    @Column(name="status")

    public int getStatus() {
        return this.status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Column(name="createtime", length=19)

    public Date getCreatetime() {
        return this.createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    @Column(name="modifytime", length=19)

    public Date getModifytime() {
        return this.modifytime;
    }

    public void setModifytime(Date modifytime) {
        this.modifytime = modifytime;
    }

    @Column(name="fastchargetype", length=40)

    public int getFastchargetype() {
        return this.fastchargetype;
    }
	public void setFastchargetype(Integer fastchargetype) {
		this.fastchargetype = fastchargetype;
	}

    @Column(name="downfailnum")

    public Integer getDownfailnum() {
        return this.downfailnum;
    }

    public void setDownfailnum(Integer downfailnum) {
        this.downfailnum = downfailnum;
    }

    @Column(name="downtimeinterva")

    public Integer getDowntimeinterva() {
        return this.downtimeinterva;
    }

    public void setDowntimeinterva(Integer downtimeinterva) {
        this.downtimeinterva = downtimeinterva;
    }

    @Column(name="remark", length=1000)

    public String getRemark() {
        return this.remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Column(name="price", precision=28, scale=5)
	public BigDecimal getPrice() {
		return price;
	}


	public void setPrice(BigDecimal price) {
		this.price = price;
	}


	@Column(name="discount_amount", precision=28, scale=5)
	public BigDecimal getDiscountAmount() {
		return discountAmount;
	}


	public void setDiscountAmount(BigDecimal discountAmount) {
		this.discountAmount = discountAmount;
	}

	@Column(name="auto")
	public int getAuto() {
		return auto;
	}

	public void setAuto(int auto) {
		this.auto = auto;
	}

	@Column(name="validity")
	public String getValidity() {
		return validity;
	}

	public void setValidity(String validity) {
		this.validity = validity;
	}


//	", productCode="	+ productCode +

//@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="downShopProduct")
//
//    public Set<DownProLog> getDownProLogs() {
//        return this.downProLogs;
//    }
//
//    public void setDownProLogs(Set<DownProLog> downProLogs) {
//        this.downProLogs = downProLogs;
//    }
//@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="downShopProduct")
//
//    public Set<DownRechargeGame> getDownRechargeGames() {
//        return this.downRechargeGames;
//    }
//
//    public void setDownRechargeGames(Set<DownRechargeGame> downRechargeGames) {
//        this.downRechargeGames = downRechargeGames;
//    }
//@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="downShopProduct")
//
//    public Set<DownRechargeFlow> getDownRechargeFlows() {
//        return this.downRechargeFlows;
//    }
//
//    public void setDownRechargeFlows(Set<DownRechargeFlow> downRechargeFlows) {
//        this.downRechargeFlows = downRechargeFlows;
//    }









}
